<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="/include/taglibs.jsp" %>
<html>
<head>
    <%@include file="/include/header.html" %>
    <script type="text/javascript" src="${ctx}/appjs/ugs/tenantUgsLevelGrowing.js"></script>
</head>

<script type="text/javascript">
    $('#topLink', window.parent.document).html(function (i, origText) {
        return '<br>' +
            '<ol class="breadcrumb">' +
            '<li class="breadcrumb-item">' +
            '<a href="">主页</a>' +
            '</li>' +
            '<li class="breadcrumb-item">' +
            '<a>会员管理</a>' +
            '</li>' +
            '<li class="breadcrumb-item">' +
            '<strong>编辑任务中心&成长值</strong>' +
            '</li>' +
            '<li class="breadcrumb-item">' +
            '<a href="javascript:window.history.back()"><i class="fa fa-times"></i> 返回</a>' +
            '</li>' +
            '</ol>';
    });

</script>

<body class="gray-bg">
<div class="wrapper wrapper-content ">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <div class="columns pull-left">
                        <h5 class="font-bold">编辑经验值规则</h5>
                    </div>
                    <div class="ibox-tools">
                        <a class="close-link">
                            <i class="fa fa-times"></i>
                        </a>
                    </div>
                </div>

                <div class="ibox-content">
                    <form class="form-horizontal m-t layui-form" id="frmTenantUgsLevelGrowing" >
                        <input name="levelGrowingId" id="levelGrowingId" value="${tenantUgsLevelGrowing.levelGrowingId}"
                               type="hidden">
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">任务名称：</label>
                            <div class="col-sm-4">
                                <input type="text" class="form-control" id="growingTypeName" name="growingTypeName"
                                       value="${tenantUgsLevelGrowing.growingTypeName}">
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">任务类型：</label>
                            <div class="col-sm-4" >
                                <select disabled class="form-control">
                                    <option
                                            <c:if test="${tenantUgsLevelGrowing.growingType eq '0'}">selected</c:if> >
                                        签到
                                    </option>
                                    <option
                                            <c:if test="${tenantUgsLevelGrowing.growingType eq '1'}">selected</c:if> >
                                        充电量/度
                                    </option>
                                    <option
                                            <c:if test="${tenantUgsLevelGrowing.growingType eq '2'}">selected</c:if> >
                                        分享
                                    </option>
                                </select>
                            </div>
                        </div>

                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">成长规则：</label>
                            <div class="col-sm-4">
                                <select disabled class="form-control">
                                    <option
                                            <c:if test="${tenantUgsLevelGrowing.growingRule eq '0'}">selected</c:if> >
                                        每次固定值
                                    </option>
                                    <option
                                            <c:if test="${tenantUgsLevelGrowing.growingRule eq '1'}">selected</c:if> >
                                        每次翻倍
                                    </option>
                                    <option
                                            <c:if test="${tenantUgsLevelGrowing.growingRule eq '2'}">selected</c:if> >
                                        每次累加
                                    </option>
                                </select>
                            </div>
                        </div>

                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">基本成长值：</label>
                            <div class="col-sm-4">
                                <div class="input-group m-b">
                                    <input type="text" class="form-control" name="experienceValue" id="experienceValue"
                                           placeholder="请输入经验值" value="${tenantUgsLevelGrowing.experienceValue}">
                                </div>
                            </div>
                        </div>

                        <%--<div class="form-group row">--%>
                            <%--<label class="col-sm-3 col-form-label text-right">周期：</label>--%>
                            <%--<div class="col-sm-4">--%>
                                <%--<input type="text" class="form-control" name="cycle" id="cycle"--%>
                                       <%--placeholder="请输入每日经验封顶值" value="${tenantUgsLevelGrowing.cycle}">--%>
                            <%--</div>--%>
                        <%--</div>--%>

                        <%--<div class="form-group row">--%>
                            <%--<label class="col-sm-3 col-form-label text-right">每日限制条件：</label>--%>
                            <%--<div class="col-sm-1.5">--%>
                                <%--<input type="radio" class="form-control" name="conditionType"  lay-filter="conditionType"--%>
                                       <%--title="每日成长值上限" value="0"    <c:if test="${tenantUgsLevelGrowing.conditionType eq '0'}">checked</c:if>   >--%>
                            <%--</div>--%>
                            <%--<div class="col-sm-1.5">--%>
                                <%--<input type="radio" class="form-control" name="conditionType"--%>
                                       <%--lay-filter="conditionType" title="每日次数限制" value="1" <c:if test="${tenantUgsLevelGrowing.conditionType eq '1'}">checked</c:if>  >--%>
                            <%--</div>--%>
                        <%--</div>--%>

                        <%--<div class="form-group row">--%>
                            <%--<label class="col-sm-3 col-form-label text-right"></label>--%>
                            <%--<div class="col-sm-4">--%>
                                <%--<input type="text" class="form-control" name="conditionValue" id="conditionValue" value="${tenantUgsLevelGrowing.conditionValue}">--%>
                            <%--</div>--%>
                            <%--<div class="col-sm-1 valueEveryDay">--%>
                               <%--成长值/日--%>
                            <%--</div>--%>
                            <%--<div class="col-sm-1 numberEveryDay hide">--%>
                               <%--次/日--%>
                            <%--</div>--%>
                        <%--</div>--%>

                        <div class="form-group">
                            <div class="col-sm-3 col-sm-offset-8 text-right">
                                <button type="submit" class="btn btn-primary">提交</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">

    layui.use(['form', 'jquery', 'tree', 'laydate', 'util'], function () {

        var form = layui.form;
        var $ = layui.jquery;

        //一次与多次切换
        form.on("radio(conditionType)", function (data) {
            if ($(this).val() == "0") {
                $(".numberEveryDay").addClass("hide");
                $(".valueEveryDay").removeClass("hide");
            } else {
                $(".valueEveryDay").addClass("hide");
                $(".numberEveryDay").removeClass("hide");
            }
        });

    })


    editTenantUgsLevelGrowing.init();
</script>
</body>
</html>
